package vista;

import com.cloudgarden.layout.AnchorConstraint;
import com.cloudgarden.layout.AnchorLayout;

import controlador.ControladorAC;

import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.JTextField;
import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;

/**
 * This code was edited or generated using CloudGarden's Jigloo SWT/Swing GUI
 * Builder, which is free for non-commercial use. If Jigloo is being used
 * commercially (ie, by a corporation, company or business for any purpose
 * whatever) then you should purchase a license for each developer using Jigloo.
 * Please visit www.cloudgarden.com for details. Use of Jigloo implies
 * acceptance of these licensing terms. A COMMERCIAL LICENSE HAS NOT BEEN
 * PURCHASED FOR THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED LEGALLY FOR
 * ANY CORPORATE OR COMMERCIAL PURPOSE.
 */
public class AltaSucursal extends javax.swing.JFrame {
	private JLabel jLabel1;
	private JPanel jPanel1;
	private JTextField nombre;
	private JLabel jLabel5;
	private JSeparator jSeparator1;
	private JButton crearDeposito;
	private JButton depositoEstado;
	private JTextField deposito;
	private JLabel jLabel7;
	private JButton crearBarra;
	private JButton barraEstado;
	private JTextField barra;
	private JLabel jLabel6;
	private JButton crearCafeteria;
	private JButton estadoCafeteria;
	private JTextField cafeteria;
	private JButton guardarSucursal;
	private JButton crearCaja;
	private JButton cajaEstado;
	private JTextField caja;
	private JLabel jLabel8;
	private JButton cancelar;
	private JButton aceptar;
	private JButton crearCocina;
	private JButton cocinaEstado;
	private JTextField cocina;
	private JLabel jLabel4;
	private JButton crearSalon;
	private JButton salonEstado;
	private JTextField salon;
	private JLabel jLabel3;
	private JLabel jLabel2;

	/**
	 * Auto-generated main method to display this JFrame
	 */
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				AltaSucursal inst = new AltaSucursal();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}

	public AltaSucursal() {
		super();
		initGUI();
	}

	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			{
				jLabel1 = new JLabel();
				getContentPane().add(jLabel1);
				jLabel1.setText("Alta Sucursal");
				jLabel1.setBounds(28, 20, 200, 37);
				jLabel1.setFont(new java.awt.Font("Calibri", 0, 24));
			}
			{
				jPanel1 = new JPanel();
				AnchorLayout jPanel1Layout = new AnchorLayout();
				jPanel1.setLayout(jPanel1Layout);
				getContentPane().add(jPanel1);
				jPanel1.setBounds(0, 111, 553, 364);
				jPanel1.setVisible(false);

				{
					jLabel3 = new JLabel();
					jPanel1.add(jLabel3, new AnchorConstraint(82, 228, 122,
							111, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					jLabel3.setText("Salon");
					jLabel3.setPreferredSize(new java.awt.Dimension(65, 14));
				}
				{
					salon = new JTextField();
					jPanel1.add(salon, new AnchorConstraint(73, 512, 131, 225,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					salon.setPreferredSize(new java.awt.Dimension(159, 20));
				}
				{
					salonEstado = new JButton();
					jPanel1.add(salonEstado, new AnchorConstraint(73, 590, 134,
							534, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					salonEstado.setBackground(new java.awt.Color(255, 0, 0));
					salonEstado
							.setPreferredSize(new java.awt.Dimension(31, 21));
					salonEstado.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							System.out
									.println("salonEstado.actionPerformed, event="
											+ evt);
							// TODO add your code for
							// salonEstado.actionPerformed
						}
					});
				}
				{
					crearSalon = new JButton();
					jPanel1.add(crearSalon, new AnchorConstraint(76, 865, 134,
							659, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					crearSalon.setText("Alta Salon");
					crearSalon
							.setPreferredSize(new java.awt.Dimension(114, 20));
					crearSalon.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							AltaSalon a = new AltaSalon();
							a.setVisible(true);
						}
					});
				}
				{
					jLabel4 = new JLabel();
					jPanel1.add(jLabel4, new AnchorConstraint(199, 214, 241,
							111, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					jLabel4.setText("Cocina");
					jLabel4.setPreferredSize(new java.awt.Dimension(57, 15));
				}
				{
					cocina = new JTextField();
					jPanel1.add(cocina, new AnchorConstraint(191, 512, 247,
							225, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					cocina.setPreferredSize(new java.awt.Dimension(159, 20));
				}
				{
					cocinaEstado = new JButton();
					jPanel1.add(cocinaEstado, new AnchorConstraint(188, 590,
							247, 534, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					cocinaEstado.setBackground(new java.awt.Color(255, 0, 0));
					cocinaEstado
							.setPreferredSize(new java.awt.Dimension(31, 21));
					cocinaEstado.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							System.out
									.println("cocinaEstado.actionPerformed, event="
											+ evt);
							// TODO add your code for
							// cocinaEstado.actionPerformed
						}
					});
				}
				{
					crearCocina = new JButton();
					jPanel1.add(crearCocina, new AnchorConstraint(194, 865,
							250, 659, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					crearCocina.setText("Alta Cocina");
					crearCocina
							.setPreferredSize(new java.awt.Dimension(114, 20));
					crearCocina.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							System.out
									.println("crearCocina.actionPerformed, event="
											+ evt);
							// TODO add your code for
							// crearCocina.actionPerformed
						}
					});
				}
				{
					jLabel5 = new JLabel();
					jPanel1.add(jLabel5, new AnchorConstraint(319, 190, 358,
							78, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					jLabel5.setText("Cafeteria");
					jLabel5.setPreferredSize(new java.awt.Dimension(62, 14));
				}
				{
					cafeteria = new JTextField();
					jPanel1.add(cafeteria, new AnchorConstraint(311, 510, 367,
							223, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					cafeteria.setPreferredSize(new java.awt.Dimension(159, 20));
				}
				{
					estadoCafeteria = new JButton();
					jPanel1.add(estadoCafeteria, new AnchorConstraint(308, 588,
							367, 532, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					estadoCafeteria
							.setBackground(new java.awt.Color(255, 0, 0));
					estadoCafeteria.setPreferredSize(new java.awt.Dimension(31,
							21));
					estadoCafeteria.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							System.out
									.println("cocinaEstado.actionPerformed, event="
											+ evt);
							// TODO add your code for
							// cocinaEstado.actionPerformed
						}
					});
				}
				{
					crearCafeteria = new JButton();
					jPanel1.add(crearCafeteria, new AnchorConstraint(311, 865,
							367, 659, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					crearCafeteria.setText("Alta Cafeteria");
					crearCafeteria.setPreferredSize(new java.awt.Dimension(114,
							20));
					crearCafeteria.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							System.out
									.println("crearCafeteria.actionPerformed, event="
											+ evt);
							// TODO add your code for
							// crearCafeteria.actionPerformed
						}
					});
				}
				{
					jLabel6 = new JLabel();
					jPanel1.add(jLabel6, new AnchorConstraint(437, 190, 476,
							107, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					jLabel6.setText("Barra");
					jLabel6.setPreferredSize(new java.awt.Dimension(46, 14));
				}
				{
					barra = new JTextField();
					jPanel1.add(barra, new AnchorConstraint(428, 510, 484, 223,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					barra.setPreferredSize(new java.awt.Dimension(159, 20));
				}
				{
					barraEstado = new JButton();
					jPanel1.add(barraEstado, new AnchorConstraint(425, 588,
							484, 532, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					barraEstado.setBackground(new java.awt.Color(255, 0, 0));
					barraEstado
							.setPreferredSize(new java.awt.Dimension(31, 21));
					barraEstado.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							System.out
									.println("cocinaEstado.actionPerformed, event="
											+ evt);
							// TODO add your code for
							// cocinaEstado.actionPerformed
						}
					});
				}
				{
					crearBarra = new JButton();
					jPanel1.add(crearBarra, new AnchorConstraint(425, 865, 481,
							659, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					crearBarra.setText("Alta Barra");
					crearBarra
							.setPreferredSize(new java.awt.Dimension(114, 20));
					crearBarra.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							System.out
									.println("crearBarra.actionPerformed, event="
											+ evt);
							// TODO add your code for crearBarra.actionPerformed
						}
					});
				}
				{
					jLabel7 = new JLabel();
					jPanel1.add(jLabel7, new AnchorConstraint(548, 190, 590,
							78, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					jLabel7.setText("Deposito");
					jLabel7.setPreferredSize(new java.awt.Dimension(62, 15));
				}
				{
					deposito = new JTextField();
					jPanel1.add(deposito, new AnchorConstraint(537, 510, 593,
							223, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					deposito.setPreferredSize(new java.awt.Dimension(159, 20));
				}
				{
					depositoEstado = new JButton();
					jPanel1.add(depositoEstado, new AnchorConstraint(534, 590,
							593, 534, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					depositoEstado.setBackground(new java.awt.Color(255, 0, 0));
					depositoEstado.setPreferredSize(new java.awt.Dimension(31,
							21));
					depositoEstado.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							System.out
									.println("cocinaEstado.actionPerformed, event="
											+ evt);
							// TODO add your code for
							// cocinaEstado.actionPerformed
						}
					});
				}
				{
					crearDeposito = new JButton();
					jPanel1.add(crearDeposito, new AnchorConstraint(534, 865,
							590, 659, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					crearDeposito.setText("Alta Deposito");
					crearDeposito.setPreferredSize(new java.awt.Dimension(114,
							20));
					crearDeposito.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							System.out
									.println("crearDeposito.actionPerformed, event="
											+ evt);
							// TODO add your code for
							// crearDeposito.actionPerformed
						}
					});
				}
				{
					aceptar = new JButton();
					jPanel1.add(aceptar, new AnchorConstraint(831, 709, 886,
							534, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					aceptar.setText("Aceptar");
					aceptar.setPreferredSize(new java.awt.Dimension(97, 20));
					aceptar.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							System.out
									.println("aceptar.actionPerformed, event="
											+ evt);
							// TODO add your code for aceptar.actionPerformed
						}
					});
				}
				{
					cancelar = new JButton();
					jPanel1.add(cancelar, new AnchorConstraint(831, 903, 886,
							744, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					cancelar.setText("Cancelar");
					cancelar.setPreferredSize(new java.awt.Dimension(88, 20));
					cancelar.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							System.out
									.println("cancelar.actionPerformed, event="
											+ evt);
							// TODO add your code for cancelar.actionPerformed
						}
					});
				}
				{
					jLabel8 = new JLabel();
					jPanel1.add(jLabel8, new AnchorConstraint(663, 170, 699,
							107, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					jLabel8.setText("Caja");
					jLabel8.setPreferredSize(new java.awt.Dimension(35, 13));
				}
				{
					caja = new JTextField();
					jPanel1.add(caja, new AnchorConstraint(643, 510, 699, 223,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					caja.setPreferredSize(new java.awt.Dimension(159, 20));
				}
				{
					cajaEstado = new JButton();
					jPanel1.add(cajaEstado, new AnchorConstraint(646, 590, 705,
							534, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					cajaEstado.setBackground(new java.awt.Color(255, 0, 0));
					cajaEstado.setPreferredSize(new java.awt.Dimension(31, 21));
					cajaEstado.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							System.out
									.println("cocinaEstado.actionPerformed, event="
											+ evt);
							// TODO add your code for
							// cocinaEstado.actionPerformed
						}
					});
				}
				{
					crearCaja = new JButton();
					jPanel1.add(crearCaja, new AnchorConstraint(649, 865, 705,
							659, AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL,
							AnchorConstraint.ANCHOR_REL));
					crearCaja.setText("Alta Caja");
					crearCaja.setPreferredSize(new java.awt.Dimension(114, 20));
				}
			}
			{
				jSeparator1 = new JSeparator();
				getContentPane().add(jSeparator1);
				jSeparator1.setBounds(-10, 63, 582, 10);
			}
			{
				nombre = new JTextField();
				getContentPane().add(nombre);
				nombre.setBounds(125, 83, 159, 19);
			}
			{
				jLabel2 = new JLabel();
				getContentPane().add(jLabel2);
				jLabel2.setText("Nombre");
				jLabel2.setBounds(40, 85, 77, 14);
			}
			{
				guardarSucursal = new JButton();
				getContentPane().add(guardarSucursal);
				guardarSucursal.setText("Guardar");
				guardarSucursal.setBounds(364, 81, 111, 23);
				guardarSucursal.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent evt) {
						jPanel1.setVisible(true);
						ControladorAC.getInstancia().altaSucursal(
								nombre.getText());
					}
				});
			}
			pack();
			this.setSize(569, 490);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
